const fs = require('fs');
const path = require('path')
const resolve = (filename) => {
  return path.resolve(__dirname, filename);
};
fs.open(resolve('a.txt'),'r',(err,fd)=>{
  let buffer = Buffer.alloc(2);
  fs.read(fd, buffer, 0, 2, 20, (err, bytesRead) => {
    console.log('bytesRead:',bytesRead);
    console.log('buffer:',buffer);
  })
})
